function [stt,etamat,smooth_st,yfor,yferr,logL]=kfilterNSplitsPad(parvec,funcmod,Y,trainvec,solveopt,addSol,X)
% ====================================================================
addSol.NPad=size(X,2); 
YConcat=nan(size(Y,1),size(Y,2)+addSol.NPad); 
YConcat(:,1:size(Y,2))=Y; 
posFill=(size(Y,2)-size(X,1)+1):size(Y,2); 
if length(posFill)~=size(X,1); 
    error('Wrong Filler') 
end 
if isempty(trainvec)
    trainvec=[1 size(Y,1)];
end
YConcat(posFill,size(Y,2)+1:end)=X; 
%% 1. Model solution
% Matrices of second sample stored in structure second 
[G,R,C,eu,SDX,Z,structOne,~,~]=feval(funcmod,parvec,solveopt,addSol);
if ~isequal(eu,[1;1]) 
    error('Model is not determinate') 
end 
[stt,etamat,smooth_st,yfor,yferr,logL]=kfilterNSplitsSub(YConcat,G,R,C,SDX,Z,trainvec); 
